/**
 * @Title: SsoUserHolder.java
 * @Package com.kaver.sso.helper
 * @author roc
 * @date Aug 11, 2021 11:16:27 AM
 * @version V1.0
 * @copyright kaver
 */
package com.kaver.sso.helper;

import com.kaver.sso.def.resp.User;

/**
 * @ClassName: SsoUserHolder
 * @Description: 认证中心用户存储
 * @author roc
 * @date Aug 11, 2021 11:16:27 AM
 * 
 */
public class SsoUserHolder {
    
    private static ThreadLocal<User> local = new ThreadLocal<>();

    public static void set(User user) {
        local.set(user);
    }

    public static User get() {
        return local.get();
    }

    public static void remove() {
        local.remove();
    }
}
